package com.dailyblue.java.thread;

// 线程的实现方式2⃣️  任务
public class DemoB implements Runnable{
    @Override
    public void run() {
        // 获取当前运行线程
        Thread thread = Thread.currentThread();
        for (int i = 0; i < 20; i++) {
            System.out.println(thread.getName() + "运行了:" + i);
        }
    }
}
